<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>放映场次管理</title>
<<<<<<< HEAD
    <link href="/movie/Movie_version_1.00/movie/Public/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/movie/Movie_version_1.00/movie/Public/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="/movie/Movie_version_1.00/movie/Public/static/admin/css/layout.css" rel="stylesheet">
    <!--artDialog-->
    <link href="/movie/Movie_version_1.00/movie/Public/static/art-dialog/css/ui-dialog.css" rel="stylesheet"/>
    <script src="/movie/Movie_version_1.00/movie/Public/static/art-dialog/dist/dialog-min.js"></script>
    <!--RainJS-->
    <link href="/movie/Movie_version_1.00/movie/Public/static/pfinal/css/base.css" rel="stylesheet"/>
    <script src="/movie/Movie_version_1.00/movie/Public/static/pfinal/pfinal.js"></script>
=======
    <link href="/project3/movie/movie/Public/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="/project3/movie/movie/Public/static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link href="/project3/movie/movie/Public/static/admin/css/layout.css" rel="stylesheet">
    <!--artDialog-->
    <link href="/project3/movie/movie/Public/static/art-dialog/css/ui-dialog.css" rel="stylesheet"/>
    <script src="/project3/movie/movie/Public/static/art-dialog/dist/dialog-min.js"></script>
    <!--RainJS-->
    <link href="/project3/movie/movie/Public/static/pfinal/css/base.css" rel="stylesheet"/>
    <script src="/project3/movie/movie/Public/static/pfinal/pfinal.js"></script>
>>>>>>> 2583b002bdd9e079cb754cdfea42eda8b9e40712

</head>
<body>
<!-- .row必须包含在 .container(固定宽度)或 .container-fluid(100% 宽度)中，以便为其赋予合适的排列(aligment)和内补(padding)-->
<nav class="layout-header">
    <div class="container layout-width">
        <div class="row">
            <div class="col-md-12">
                <div class="pull-left">
                    <a href="" class="logo">
                        <span class="fa fa-desktop"></span> 商户管理后台
                    </a>
                </div>
                <div class="pull-right">
                <span class="account-info">
                    <span>欢迎:<?php echo ($username); ?></span>
                     <i class="glyphicon glyphicon-print"></i>
                    <a class="login-out" href="<?php echo U('Default/logout');?>">退出</a>
                </span>
                </div>
            </div>
        </div>
    </div>
</nav>

<section class="container layout-main layout-width">
    <div class="row">
        <div class="col-md-12 display-table">

            <!--左菜单区域-->
            <div class="layout-menu" >
                <ul class="main-menu">
                <li>
                    <button style="width:100%" type="button" class="btn btn-default btn-lg">放映厅管理</button>
                </li>
                    <li>
                        <a class="menu-item" href="<?php echo U('Room/index');?>">
                            <i class="glyphicon glyphicon-time"></i>
                            <i class="icon pull-right"></i>
                            <span>放映厅列表</span>
                        </a>
                    </li>
                    <li class="">
                        <a class="menu-item" href="" data-toggle="modal" data-target="#myModal4">
                            <i class="icon glyphicon glyphicon-th-large"></i>
                            <i class="icon pull-right"></i>
                            <span>添加放映厅</span>
                        </a>
                    </li>
                    <li>
                    <button style="width:100%" type="button" class="btn btn-default btn-lg">放映场次管理</button>
                    </li>
                    
                    <li class="">
                        <a class="menu-item" href="<?php echo U('Index/index');?>">
                            <i class="glyphicon glyphicon-play-circle"></i>
                            <i class="icon pull-right"></i>
                            <span>放映场次列表</span>
                        </a>
                    </li>
                    <li class="">
                        <a class="menu-item" data-toggle="modal" data-target="#myModal5" href="">
                            <i class="icon glyphicon glyphicon-th-large"></i>
                            <i class="icon pull-right"></i>
                            <span>添加放映场次</span>
                        </a>
                    </li>
                </ul>
            </div>
            <!-- 左菜单区域结束-->

            <!--右内容区域-->
            
    <!--右内容区域-->
    <div class="layout-content">
        <!--<div class="top-nav" style="margin-left:72%;position: absolute;margin-top:2%;">-->
        <!--<button type="button" class="btn btn-success" data-toggle="modal" data-target="#myModal4">添加影厅</button>-->
        <!--</div>-->
        <div class="page-title">放映场次管理</div>

        <div class="content-top">
            <ul class="top-nav">
                <li class="active"><span>放映场次列表</span></li>
            </ul>
            <div class="clearfix"></div>

        </div>
        <!--content-main end-->
        <div class="container-fluid content-main">
            <div class="row">
                <div class="col-md-12">
                    <div class="hidden ui-tips bg-info" id="error">
                        <span class=" icon glyphicon glyphicon-info-sign">d12121</span>
                    </div>
                    <!-- <?php echo (dump($movies)); ?> -->
                    <form class="form-horizontal" method="post" onsubmit="return false">

                        <div class="form-group">
                            <label class="col-sm-2 control-label">ID</label>

                            <div class="col-sm-8">
                                <input type="text" name="id" class="form-control" value="<?php echo ($data['id']); ?>" id="id" readonly="readonly">
                                <span class="help-block"></span>
                            </div>
                        </div>
                          <div class="form-group">
                            <label class="col-sm-2 control-label">电影</label>

                            <div class="col-sm-8">
                                <select class="form-control" id="name" name="name">
                                    <?php if(is_array($movies)): foreach($movies as $key=>$val): ?><option value="<?php echo ($val['id']); ?>" <?php echo ($movie==$val['id']?'selected':''); ?>><?php echo ($val['name']); ?></option><?php endforeach; endif; ?>
                                </select>
                                <span class="help-block"></span>
                            </div>
                        </div>
                          <div class="form-group">
                            <label class="col-sm-2 control-label">放映厅</label>

                            <div class="col-sm-8">
                                <select class="form-control" id="rnam" name="rnam">
                                    <?php if(is_array($room)): foreach($room as $key=>$val): ?><option value="<?php echo ($val['id']); ?>"><?php echo ($val['name']); ?></option><?php endforeach; endif; ?>
                                </select>
                                <span class="help-block"></span>
                            </div>
                        </div>
                          <div class="form-group">
                            <label class="col-sm-2 control-label">放映时间</label>
                            <div class="col-sm-8">
                                  <select name="timey" id="timey">
                                   <option value="2016">2016</option>
                               </select>
                               <select name="timem" id="timem">
<<<<<<< HEAD
                                   <?php $__FOR_START_8108__=1;$__FOR_END_8108__=13;for($i=$__FOR_START_8108__;$i < $__FOR_END_8108__;$i+=1){ ?><option value="<?php echo ($i); ?>"  <?php echo ($m==$i?'selected':''); ?> ><?php echo ($i); ?>月</option><?php } ?>
=======
<<<<<<< HEAD
                                   <?php $__FOR_START_23609__=1;$__FOR_END_23609__=13;for($i=$__FOR_START_23609__;$i < $__FOR_END_23609__;$i+=1){ ?><option value="<?php echo ($i); ?>"  <?php echo ($m==$i?'selected':''); ?> ><?php echo ($i); ?>月</option><?php } ?>
                               </select>
                               <select name="timed" id="timed">
                                   <?php $__FOR_START_21118__=1;$__FOR_END_21118__=32;for($i=$__FOR_START_21118__;$i < $__FOR_END_21118__;$i+=1){ ?><option value="<?php echo ($i); ?>" <?php echo ($d==$i?'selected':''); ?>><?php echo ($i); ?>日</option><?php } ?>
                               </select>
                               <select name="timeh" id="timeh">
                                   <?php $__FOR_START_13279__=1;$__FOR_END_13279__=25;for($i=$__FOR_START_13279__;$i < $__FOR_END_13279__;$i+=1){ ?><option value="<?php echo ($i); ?>" <?php echo ($h==$i?'selected':''); ?>><?php echo ($i); ?>时</option><?php } ?>
                               </select>
                               <select name="timei" id="timei">
                                   <?php $__FOR_START_14380__=1;$__FOR_END_14380__=61;for($i=$__FOR_START_14380__;$i < $__FOR_END_14380__;$i+=1){ ?><option value="<?php echo ($i); ?>" <?php echo ($mi==$i?'selected':''); ?>><?php echo ($i); ?>分</option><?php } ?>
=======
                                   <?php $__FOR_START_10218__=1;$__FOR_END_10218__=13;for($i=$__FOR_START_10218__;$i < $__FOR_END_10218__;$i+=1){ ?><option value="<?php echo ($i); ?>"  <?php echo ($m==$i?'selected':''); ?> ><?php echo ($i); ?>月</option><?php } ?>
>>>>>>> 2a3371089cccbebdcaee5c5d430f53a1138dd6b9
                               </select>
                               <select name="timed" id="timed">
                                   <?php $__FOR_START_5237__=1;$__FOR_END_5237__=32;for($i=$__FOR_START_5237__;$i < $__FOR_END_5237__;$i+=1){ ?><option value="<?php echo ($i); ?>" <?php echo ($d==$i?'selected':''); ?>><?php echo ($i); ?>日</option><?php } ?>
                               </select>
                               <select name="timeh" id="timeh">
                                   <?php $__FOR_START_3082__=1;$__FOR_END_3082__=25;for($i=$__FOR_START_3082__;$i < $__FOR_END_3082__;$i+=1){ ?><option value="<?php echo ($i); ?>" <?php echo ($h==$i?'selected':''); ?>><?php echo ($i); ?>时</option><?php } ?>
                               </select>
                               <select name="timei" id="timei">
<<<<<<< HEAD
                                   <?php $__FOR_START_23675__=1;$__FOR_END_23675__=61;for($i=$__FOR_START_23675__;$i < $__FOR_END_23675__;$i+=1){ ?><option value="<?php echo ($i); ?>" <?php echo ($mi==$i?'selected':''); ?>><?php echo ($i); ?>分</option><?php } ?>
=======
                                   <?php $__FOR_START_14417__=1;$__FOR_END_14417__=61;for($i=$__FOR_START_14417__;$i < $__FOR_END_14417__;$i+=1){ ?><option value="<?php echo ($i); ?>" <?php echo ($mi==$i?'selected':''); ?>><?php echo ($i); ?>分</option><?php } ?>
>>>>>>> 2583b002bdd9e079cb754cdfea42eda8b9e40712
>>>>>>> 2a3371089cccbebdcaee5c5d430f53a1138dd6b9
                               </select>
                                <span class="help-block"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">单价</label>

                            <div class="col-sm-8">
                                <input type="text" name="cp" class="form-control" value="<?php echo ($data['cp']); ?>" id="cp">
                                <span class="help-block"></span>
                            </div>
                        </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-8">
                        <button class="btn btn-default" id="revise">保存</button>
                    </div>
                </div>
                </form>
            </div>
        </div>

    </div>
    </div>
    <!--右内容区域结束-->

            <!--右内容区域结束-->
            <div class="clearfix"></div>
        </div>
    </div>
</section>
<footer class="layout-footer">
    <div class="container layout-width">
        <div class="row">
            <div class="col-md-12">
                <ul class="links">
                    <li><a href="" target="_blank">关于我们</a></li>
                    <li><a href="" target="_blank">服务协议</a></li>
                    <li><a href="" target="_blank">运营规范</a></li>
                    <li><a href="" target="_blank">客服中心</a></li>
                    <li><a href="" target="_blank">在线客服</a></li>
                    <li><p class="copyright">Copyright.All Rights Reserved.</p></li>
                </ul>
            </div>
        </div>
    </div>
</footer>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<<<<<<< HEAD
<script src="/movie/Movie_version_1.00/movie/Public/static/ie8/html5shiv.min.js"></script>
<script src="/movie/Movie_version_1.00/movie/Public/static/ie8/respond.min.js"></script>
<![endif]-->

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/movie/Movie_version_1.00/movie/Public/static/jquery/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/movie/Movie_version_1.00/movie/Public/static/bootstrap/js/bootstrap.min.js"></script>
=======
<script src="/project3/movie/movie/Public/static/ie8/html5shiv.min.js"></script>
<script src="/project3/movie/movie/Public/static/ie8/respond.min.js"></script>
<![endif]-->

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="/project3/movie/movie/Public/static/jquery/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="/project3/movie/movie/Public/static/bootstrap/js/bootstrap.min.js"></script>
>>>>>>> 2583b002bdd9e079cb754cdfea42eda8b9e40712

    <script>
         var room=$('#rnam option');     
         var r=<?php echo ($r); ?>;
         for (var i = 0; i <room.length; i++) {
               if($(room[i]).val()==r){
               //$(room[i]).addClass('selected');
               $(room[i]).attr("selected","selected");
            }
         };

        $('#revise').click(function () {
             //alert(1);
              var ctime=$('#timey').val()+'-'+$('#timem').val()+'-'+$('#timed').val()+'-'+$('#timeh').val()+'-'+$('#timei').val();
            $.ajax({
                url: "<?php echo U('index/update');?>",
                type: 'POST',
                data: {'id': $('#id').val(), 'movie_id': $('#name').val(), 'room_id': $('#rnam').val(),'showtime': ctime, 'price': $('#cp').val()},
                dataType: 'json',
                success: function (data) {
                       /*  if (data==1) {
          $('#error').attr('class', 'ui-tips bg-info').find('span').html('修改成功');
                         }else{
          $('#error').attr('class', 'ui-tips bg-info').find('span').html('未进行任何修改');
                 }*/
                    switch(data){
                        case 1:
         $('#error').attr('class', 'ui-tips bg-info').find('span').html('修改成功');
                            break;
                        case 2:
         $('#error').attr('class', 'ui-tips bg-info').find('span').html('未进行任何修改');
                            break;
                        case 3:
          $('#error').attr('class', 'ui-tips bg-info').find('span').html('价格不能为空哦');
                            break;
                    }
                }

             })
        })
    </script>

</body>
</html>